<jsp:include page="header.jsp" />
<jsp:include page="sidenav.jsp" />

<%@ page import="java.util.List" %>
<%@ page import="databean.ItemBean" %>

<div id ="content">
    <h1>Books in my selling list</h1>
	<hr />	
	<ul id="ItemList">
<% 
	List<ItemBean> items=(List<ItemBean>) request.getAttribute("items");
	boolean background = true;
	for(ItemBean item:items){
%>

		
	
<%
		if (background) {
%>



		<li class = "row0">

			<a href="<%=item.getViewItemURL()%>" target="_blank"><%=item.getTitle()%></a><br/>
			<label for="price">Price:</label><%=item.getCurrentPrice()%>
			<label for="quantity">Quantity:</label><%=item.getQuantity()%>
			<label for="itemid">ItemID:</label><%=item.getItemID()%>

			<div id ="ebayButton">
				<input type="button" value="View" onClick="viewItem(<%=item.getItemID() %>);"></input>
				<input type="button" value="Research" onClick="researchItem('<%=item.getTitle() %>');"></input>
				<input type="button" value="Delete" onClick="deleteItem(<%=item.getItemID() %>);"></input>
			</div>


		</li>


<%
	background = false;
		} else {
%>


		<li class = row1>

		<a href="<%=item.getViewItemURL()%>" target="_blank"><%=item.getTitle()%></a><br/>
		<label for="price">Price:</label><%=item.getCurrentPrice()%>
		<label for="quantity">Quantity:</label><%=item.getQuantity()%>
		<label for="itemid">ItemID:</label><%=item.getItemID()%>
	
		<div id ="ebayButton">
			<input type="button" value="View" onClick="viewItem(<%=item.getItemID() %>);"></input>
			<input type="button" value="Research" onClick="researchItem('<%=item.getTitle() %>');"></input>
			<input type="button" value="Delete" onClick="deleteItem(<%=item.getItemID() %>);"></input>
		</div>

		</li>




<%
	background = true;
		}
}
%>
</ul>
</div>

<jsp:include page="footer.jsp" />